from fastapi import Depends

from app.dao.userDao import userDao


class UserLogic:
    """
    用户管理逻辑层
    """

    def __init__(self, user_dao: userDao = Depends()):
        self.user_dao: userDao = user_dao

    async def register(self, username: str, password: str, email: str):
        """
        注册用户
        """
        return await self.user_dao.create_user(username, password, email)

    async def login(self, username: str, password: str):
        """
        登录用户
        """
        pass
